package factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext-factory.xml");
       // UserServiceImplForFactory user = context.getBean("user", UserServiceImplForFactory.class);
       // user.m();

       // UserServiceImplForFactory user11 = context.getBean("user", UserServiceImplForFactory.class);
       // user11.m();

       /* UserServiceImplForFactory user2 = context.getBean("user2", UserServiceImplForFactory.class);
        user2.m();*/

        UserServiceImplForFactory user3 = context.getBean("user3", UserServiceImplForFactory.class);
        user3.m();
    }
}
